package com.ant.storage.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;

@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("sys_category")
@ApiModel(value="category对象", description="")
public class Category implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    private String code;         // 自身编码

    private String name;         // 名称

    @TableField("parent_code")
    private String parentCode;   // 父级编码

    // 构造方法
//    public Category(String code, String name, String parentCode) {
//        this.code = code;
//        this.name = name;
//        this.parentCode = parentCode;
//    }
}
